package com.study.happystudy.service;

import com.study.happystudy.po.File;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface FileService {
    String uploadFile(String fileName, String fileType, MultipartFile file) throws IOException;
    void copyFileToCourse(int courseId, int fileId);
    void copyFileToUser(int userId, int fileId);
    void deleteFileFromCourse(int courseId, int fileId);
    void deleteFileFromUser(int userId, int fileId);
    File getFileById(int fileId);
    void deleteFileById(int fileId);
    List<File> getFilesByNameInCourse(String fileName, int courseId);
    List<File> getFilesByNameInUser(String fileName, int userId);
    List<File> getFilesByUserId(int userId);
    List<File> getFilesByCourseId(int courseId);
}
